package repositories

import (
	"context"
	"signature-service/global"
)

type UnAuthorization struct {
	Ip   string `bson:"ip" json:"ip"`
	Mac  string `bson:"mac" json:"mac"`
	Date string `bson:"date" json:"date"`
}

// Insert 插入授权信息
func (u *UnAuthorization) Insert() error {
	client := global.DBEngine.Database(global.DBName).Collection("un_authorization")
	_, err := client.InsertOne(context.TODO(), u)
	return err
}
